Skip to content

feat(format): add oxfmt formatter support#52

Merged
ualtinok merged 1 commit into
cortexkit:mainfrom
chrisolszewski:feat/format-oxfmt
May 22, 2026
Merged

feat(format): add oxfmt formatter support#52
ualtinok merged 1 commit into
cortexkit:mainfrom
chrisolszewski:feat/format-oxfmt

Conversation

@chrisolszewski
Copy link
Copy Markdown
Contributor

@chrisolszewski chrisolszewski commented May 21, 2026

Summary

Adds oxfmt as an optional formatter for TypeScript and JavaScript. It's
auto-detected from its own config files and can be set explicitly with
formatter.typescript: "oxfmt". Biome is still the first formatter
auto-detection looks for; oxfmt applies only when there's no Biome config.

What changed

  • Rust (format.rs, configure.rs): detect .oxfmtrc.json, .oxfmtrc.jsonc,
    and oxfmt.config.ts; run oxfmt --write <file>; add an install hint; teach
    formatter_excluded_path to recognize oxfmt's "no files" messages so an
    ignored path reports format_skipped_reason: formatter_excluded_path instead
    of an error.
  • Config and schema: add oxfmt to the formatter enum in the opencode and pi
    plugins, assets/aft.schema.json, and the schema generator.
  • Docs: README and the pi README list oxfmt next to biome and prettier, biome
    first.
  • Tests: detection, explicit override, excluded-path handling, integration write.

Why biome stays first

Auto-detection order doesn't change. oxfmt is picked only when no biome config
is present, so existing biome projects behave exactly as before.

Validation

  • cargo fmt --check; cargo test -p agent-file-tools format
  • bun test for the opencode and pi config tests
  • bun run typecheck in both plugins

Summary by cubic

Adds optional oxfmt formatting for TypeScript/JavaScript. It’s auto-detected from its config, stays behind biome in priority, and can be set with formatter.typescript: "oxfmt". No changes for existing biome projects.

  • New Features
    • Auto-detects .oxfmtrc.json, .oxfmtrc.jsonc, and oxfmt.config.ts; runs oxfmt --write <file>.
    • Supports formatter.typescript: "oxfmt" in config; schemas updated in both plugins.
    • Finds local oxfmt in node_modules/.bin and shows an install hint when missing.
    • Maps oxfmt “no files” errors to format_skipped_reason: formatter_excluded_path.

Written for commit c505a41. Summary will update on new commits. Review in cubic

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 12 files

Re-trigger cubic

@ualtinok ualtinok merged commit 86e6984 into cortexkit:main May 22, 2026
7 of 8 checks passed
ualtinok added a commit that referenced this pull request May 22, 2026
Biome line-length limit triggered after adding "oxfmt" to the
formatter enum array in #52. CI on the contributor PR failed lint;
auto-format here as a follow-up.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants